package it.uniroma2.controller;

import it.uniroma2.cloud.PROVIDER;
import it.uniroma2.cloud.ProviderFactory;
import it.uniroma2.cloud.util.ProviderHelperFactory;
import it.uniroma2.jcloudstests.Command;

import java.util.Date;

public class CloudConfig {

	private Command openstackCommand;
	private Command awsCommand;
	
	private String monitoringAddress;
	
	public CloudConfig(){
		openstackCommand = new Command(ProviderFactory
				.createComputeService(PROVIDER.OPENSTACK), ProviderHelperFactory
				.getProviderHelper(PROVIDER.OPENSTACK));
		awsCommand = new Command(ProviderFactory
				.createComputeService(PROVIDER.AWS_EC2), ProviderHelperFactory
				.getProviderHelper(PROVIDER.AWS_EC2));
		
		monitoringAddress = awsCommand.getMonitoringAddress();
	}
	
	public Command getCloudstackCommand() {
		return openstackCommand;
	}
	
	public Command getAwsCommand() {
		return awsCommand;
	}
	
	public String getMonitoringAddress(){
		return monitoringAddress;
	}
	

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		CloudConfig config = new CloudConfig();
		System.out.println(new Date());
//		System.out.println(config.getAwsCommand().getLoadBalancerAddress());
//		System.out.println(config.getCloudstackCommand().getLoadBalancerAddress());
		System.out.println(config.getMonitoringAddress());
		System.out.println(new Date());

	}

}
